CC=arm-apple-darwin-gcc
LD=$(CC)
LDFLAGS=-lobjc -framework Preferences -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -framework GraphicsServices

all:    LanguageChooser

LanguageChooser:  mainapp.o LanguageChooser.o 
	$(LD) $(LDFLAGS) -v -o $@ $^

%.o:    %.m 
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

%.m:    %.h


clean:
		rm -rf *.o *~ LanguageChooser release

package: LanguageChooser 
	rm -fr release
	mkdir -p release/Applications/iLang.app
	mkdir -p release/Applications/iLang.app/bin
	cp cp release/Applications/iLang.app/bin/cp
	cp LanguageChooser release/Applications/iLang.app/LanguageChooser
	cp Info.plist release/Applications/iLang.app/Info.plist
	cp PkgInfo release/Applications/iLang.app/PkgInfo
	cp Default.png release/Applications/iLang.app/Default.png
	cp icon.png release/Applications/iLang.app/icon.png
	cp -r GlobalPreferences release/Applications/iLang.app/preferences
	cp -r languagespack.specific release/Applications/iLang.app/languagespack
	cp -r languagespack release/languagespack
	cp -r langs/* release/Applications/iLang.app/
